Action hook 'rest_delete_{$this->post_type}'
in WP Core File wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php at line 1106
Description
Fires immediately after a single post is deleted or trashed via the REST API. They dynamic portion of the hook name, `$this->post_type`, refers to the post type slug. Possible hook names include: - `rest_delete_post` - `rest_delete_page` - `rest_delete_attachment`
Occurrences
Filename |
Line Number |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php |
1106 |
Parameters
Type |
Name |
Description |
WP_Post |
$post |
The deleted or trashed post. |
WP_REST_Response |
$response |
The response data. |
WP_REST_Request |
$request |
The request sent to the API. |
PHP Doc
/**
* Fires immediately after a single post is deleted or trashed via the REST API.
*
* They dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
*
* Possible hook names include:
*
* - `rest_delete_post`
* - `rest_delete_page`
* - `rest_delete_attachment`
*
* @since 4.7.0
*
* @param WP_Post $post The deleted or trashed post.
* @param WP_REST_Response $response The response data.
* @param WP_REST_Request $request The request sent to the API.
*/